package ruanjian.service.Impl;

import ruanjian.dao.Impl.UserDaoImpl;
import ruanjian.dao.UserDao;
import ruanjian.domain.User;
import ruanjian.service.UserService;

import java.util.List;

/**
 * @Author 王新瑜
 * @Data 2024/9/20 8:46
 */
public class UserServiceImpl implements UserService {
    UserDao dao = new UserDaoImpl();
    @Override
    public List<User> findUserList() {
        return dao.findList();
    }

    @Override
    public User login(User user) {
        return dao.login(user);
    }

    @Override
    public User findUserById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public int deleteUser(Integer id) {
        return dao.delete(id);
    }

    @Override
    public int addUser(User user) {
        return dao.add(user);
    }

    @Override
    public int updateUser(User user) {
        return dao.update(user);
    }
}
